package com.zz.inventory.feign;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.zz.inventory.config.FeignConfig;
import org.example.dto.SchoolPackageRecordDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient(
        value = "schoolmanage",           // 远程服务的名称（在注册中心注册的服务名，用于发现服务）
        fallbackFactory = InventoryServiceFallbackFactory.class, // 远程调用失败时的降级工厂（处理异常）
        configuration = FeignConfig.class)// 指定Feign的配置类（如错误解码器）


public interface InventoryService {
    @PostMapping("/records")
    ResponseEntity<AjaxResult> add(@RequestBody SchoolPackageRecordDTO schoolPackageRecordDTO);
}
